3.68 \(\int \frac {\cot ^2(c+d x)}{a+a \sec (c+d x)} \, dx\)

Optimal. Leaf size=61 \[ \frac {\cot ^3(c+d x) (1-\sec (c+d x))}{3 a d}-\frac {\cot (c+d x) (3-2 \sec (c+d x))}{3 a d}-\frac {x}{a} \]

[Out]

-x/a-1/3*cot(d*x+c)*(3-2*sec(d*x+c))/a/d+1/3*cot(d*x+c)^3*(1-sec(d*x+c))/a/d

________________________________________________________________________________________

Rubi [A]  time = 0.10, antiderivative size = 61, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3888, 3882, 8} \[ \frac {\cot ^3(c+d x) (1-\sec (c+d x))}{3 a d}-\frac {\cot (c+d x) (3-2 \sec (c+d x))}{3 a d}-\frac {x}{a} \]

Antiderivative was successfully verified.

[In]

Int[Cot[c + d*x]^2/(a + a*Sec[c + d*x]),x]

[Out]

-(x/a) - (Cot[c + d*x]*(3 - 2*Sec[c + d*x]))/(3*a*d) + (Cot[c + d*x]^3*(1 - Sec[c + d*x]))/(3*a*d)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 3882

Int[(cot[(c_.) + (d_.)*(x_)]*(e_.))^(m_)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> -Simp[((e*Cot[c
+ d*x])^(m + 1)*(a + b*Csc[c + d*x]))/(d*e*(m + 1)), x] - Dist[1/(e^2*(m + 1)), Int[(e*Cot[c + d*x])^(m + 2)*(
a*(m + 1) + b*(m + 2)*Csc[c + d*x]), x], x] /; FreeQ[{a, b, c, d, e}, x] && LtQ[m, -1]

Rule 3888

Int[(cot[(c_.) + (d_.)*(x_)]*(e_.))^(m_)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n_), x_Symbol] :> Dist[a^(2*n
)/e^(2*n), Int[(e*Cot[c + d*x])^(m + 2*n)/(-a + b*Csc[c + d*x])^n, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && E
qQ[a^2 - b^2, 0] && ILtQ[n, 0]

Rubi steps

\begin {align*} \int \frac {\cot ^2(c+d x)}{a+a \sec (c+d x)} \, dx &=\frac {\int \cot ^4(c+d x) (-a+a \sec (c+d x)) \, dx}{a^2}\\ &=\frac {\cot ^3(c+d x) (1-\sec (c+d x))}{3 a d}+\frac {\int \cot ^2(c+d x) (3 a-2 a \sec (c+d x)) \, dx}{3 a^2}\\ &=-\frac {\cot (c+d x) (3-2 \sec (c+d x))}{3 a d}+\frac {\cot ^3(c+d x) (1-\sec (c+d x))}{3 a d}+\frac {\int -3 a \, dx}{3 a^2}\\ &=-\frac {x}{a}-\frac {\cot (c+d x) (3-2 \sec (c+d x))}{3 a d}+\frac {\cot ^3(c+d x) (1-\sec (c+d x))}{3 a d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.80, size = 100, normalized size = 1.64 \[ \frac {\sec (c+d x) \left (-12 d x \cos ^2\left (\frac {1}{2} (c+d x)\right )-\tan \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {d x}{2}\right ) \cos \left (\frac {1}{2} (c+d x)\right ) \left (3 \csc \left (\frac {c}{2}\right ) \cot \left (\frac {1}{2} (c+d x)\right )+13 \sec \left (\frac {c}{2}\right )\right )\right )}{6 a d (\sec (c+d x)+1)} \]

Antiderivative was successfully verified.

[In]

Integrate[Cot[c + d*x]^2/(a + a*Sec[c + d*x]),x]

[Out]

(Sec[c + d*x]*(-12*d*x*Cos[(c + d*x)/2]^2 + Cos[(c + d*x)/2]*(3*Cot[(c + d*x)/2]*Csc[c/2] + 13*Sec[c/2])*Sin[(
d*x)/2] - Tan[(c + d*x)/2]))/(6*a*d*(1 + Sec[c + d*x]))

________________________________________________________________________________________

fricas [A]  time = 0.49, size = 64, normalized size = 1.05 \[ -\frac {4 \, \cos \left (d x + c\right )^{2} + 3 \, {\left (d x \cos \left (d x + c\right ) + d x\right )} \sin \left (d x + c\right ) + \cos \left (d x + c\right ) - 2}{3 \, {\left (a d \cos \left (d x + c\right ) + a d\right )} \sin \left (d x + c\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)^2/(a+a*sec(d*x+c)),x, algorithm="fricas")

[Out]

-1/3*(4*cos(d*x + c)^2 + 3*(d*x*cos(d*x + c) + d*x)*sin(d*x + c) + cos(d*x + c) - 2)/((a*d*cos(d*x + c) + a*d)
*sin(d*x + c))

________________________________________________________________________________________

giac [A]  time = 0.24, size = 66, normalized size = 1.08 \[ -\frac {\frac {12 \, {\left (d x + c\right )}}{a} + \frac {a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 12 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{3}} + \frac {3}{a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}}{12 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)^2/(a+a*sec(d*x+c)),x, algorithm="giac")

[Out]

-1/12*(12*(d*x + c)/a + (a^2*tan(1/2*d*x + 1/2*c)^3 - 12*a^2*tan(1/2*d*x + 1/2*c))/a^3 + 3/(a*tan(1/2*d*x + 1/
2*c)))/d

________________________________________________________________________________________

maple [A]  time = 0.62, size = 74, normalized size = 1.21 \[ -\frac {\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )}{12 a d}+\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{a d}-\frac {1}{4 a d \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}-\frac {2 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(d*x+c)^2/(a+a*sec(d*x+c)),x)

[Out]

-1/12/a/d*tan(1/2*d*x+1/2*c)^3+1/a/d*tan(1/2*d*x+1/2*c)-1/4/a/d/tan(1/2*d*x+1/2*c)-2/a/d*arctan(tan(1/2*d*x+1/
2*c))

________________________________________________________________________________________

maxima [A]  time = 0.60, size = 93, normalized size = 1.52 \[ \frac {\frac {\frac {12 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {\sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}}{a} - \frac {24 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a} - \frac {3 \, {\left (\cos \left (d x + c\right ) + 1\right )}}{a \sin \left (d x + c\right )}}{12 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)^2/(a+a*sec(d*x+c)),x, algorithm="maxima")

[Out]

1/12*((12*sin(d*x + c)/(cos(d*x + c) + 1) - sin(d*x + c)^3/(cos(d*x + c) + 1)^3)/a - 24*arctan(sin(d*x + c)/(c
os(d*x + c) + 1))/a - 3*(cos(d*x + c) + 1)/(a*sin(d*x + c)))/d

________________________________________________________________________________________

mupad [B]  time = 1.29, size = 65, normalized size = 1.07 \[ -\frac {x}{a}-\frac {\frac {4\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{3}-\frac {7\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{6}+\frac {1}{12}}{a\,d\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(c + d*x)^2/(a + a/cos(c + d*x)),x)

[Out]

- x/a - ((4*cos(c/2 + (d*x)/2)^4)/3 - (7*cos(c/2 + (d*x)/2)^2)/6 + 1/12)/(a*d*cos(c/2 + (d*x)/2)^3*sin(c/2 + (
d*x)/2))

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \frac {\int \frac {\cot ^{2}{\left (c + d x \right )}}{\sec {\left (c + d x \right )} + 1}\, dx}{a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)**2/(a+a*sec(d*x+c)),x)

[Out]

Integral(cot(c + d*x)**2/(sec(c + d*x) + 1), x)/a

________________________________________________________________________________________